package com.doordu.serviceregistry;

import org.springframework.cloud.client.serviceregistry.AutoServiceRegistration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.SmartLifecycle;
import org.springframework.context.event.SmartApplicationListener;

/**
 * @author zxw
 * @date 2020/8/27 15:15
 */
public class EurekaAutoServiceRegistration implements AutoServiceRegistration, SmartLifecycle, SmartApplicationListener {
    private ApplicationContext context;

    private EurekaServiceRegistry serviceRegistry;

    private EurekaRegistration registration;

    public EurekaAutoServiceRegistration(ApplicationContext context,
                                         EurekaServiceRegistry serviceRegistry,
                                         EurekaRegistration registration) {
        this.context = context;
        this.serviceRegistry = serviceRegistry;
        this.registration = registration;
    }


    @Override
    public void onApplicationEvent(ApplicationEvent event) {

    }

    @Override
    public void start() {

    }

    @Override
    public void stop() {

    }

    @Override
    public boolean isRunning() {
        return false;
    }

    @Override
    public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) {
        return false;
    }
}
